package top.shmly.universal.base.validator;


import top.shmly.universal.base.validator.utils.BankUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;


public class BankCardValidator implements ConstraintValidator<BankCard, String> {

    @Override
    public void initialize(BankCard idCard) {
    }

    @Override
    public boolean isValid(String bankCard, ConstraintValidatorContext constraintValidatorContext) {
        return BankUtils.isBankCard(bankCard);
    }


}
